home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / rss / stresc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  795 b   |  37 lines

  1.  
  2. #ifndef MSDOS
  3.  
  4. /*                              S T R E S C . C
  5.  
  6. */
  7.  
  8. #include "../rss/icrssdef.h"
  9.  
  10. char *stresc(char *source)
  11. {
  12.     register int
  13.         c;
  14.     int
  15.         n;
  16.     char
  17.         *ret,
  18.         *dest;
  19.  
  20.     ret = source;                           /* Set return pointer */
  21.     dest = source;                          /* Initially: target is source */
  22.  
  23.     while (1)
  24.     {
  25.         if ((c = chesc(source, &n)) < 0)    /* error ? */
  26.             return (NULL);                  /* then ERROR out */
  27.  
  28.         *dest++ = (char)c;                  /* Set destination */
  29.  
  30.         if (!c)                             /* No character ? */
  31.             return (ret);                   /* then OK out */
  32.  
  33.         source += n;                        /* Skip to next char to convert */
  34.     }
  35. }
  36. #endif
  37.